<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <link rel="stylesheet" href="http://cdn.staticfile.org/cesium/1.69.0/Widgets/widgets.css">
    <link rel="stylesheet" href="../css//index.css">
</head>

<body>
    <div class="fun-menu">
        <button onclick="switchWeather('no')">无</button>
        <button onclick="switchWeather('snow')">下雪</button>
        <button onclick="switchWeather('rain')">下雨</button>
        <button onclick="switchWeather('cloudy')">阴天</button>
        <button onclick="switchWeather('fog')">雾天</button>
        <button onclick="switchWeather('daytime')">加亮</button>
    </div>
    <div id=cesiumContainer></div>

    <script src="http://cdn.staticfile.org/cesium/1.69.0/Cesium.js"></script>
    <!-- <script src="../libs/echarts/echarts.min.js"></script> -->
    <!-- <script src="../libs/heatmap/heatmap.min.js"></script> -->
    <!-- <script src="../libs/turf.min.js"></script> -->
    <script src="../libs/cpc/index.js"></script>
    <script>
        const map = new cpc.Map({
            container: "cesiumContainer",
            camera: {
                position: {
                    x: 119.3006147,
                    y: 26.0316619,
                    z: 4809,
                },
                angle: {
                    heading: 7.33,
                    pitch: -72.53,
                    roll: 0,
                },
                duration: 3,
                complete: () => {
                    console.log("飞行结束了");
                }
            },
            baseMaps: [
                "http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer",
            ],
            weather: {
                type: cpc.EWeather.fog//其他天气，查看EWeather枚举
            }
        });
        function switchWeather(str) {
            map.weather.switchWeather({
                type: cpc.EWeather[str],
                option: {
                    //很多参数，还没整理
                }
            })
        }

    </script>
</body>

</html>